Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@jborean93
jborean93 / Get-ValidatedScriptBlock.ps1
Last active May 21, 2026 01:21
WDAC Investigations for Ansible
Function Get-ValidatedScriptBlock {
[OutputType([ScriptBlock])]
param (
[Parameter(Mandatory)]
[string]
$Name,
[Parameter(Mandatory)]
[string]
$ScriptAsBase64
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@EYHN
EYHN / main.ts
Last active May 21, 2026 01:16
velopack electron workflow, with macos codesign & notarized & dmg image
import { VelopackApp } from 'velopack'
VelopackApp.build().run()
import { UpdateManager } from './update-manager'
import electron from 'electron'
const { app, ipcMain } = electron
const UPDATE_URL = 'https://s3.eyhn.in'
@rohitg00
rohitg00 / llm-wiki.md
Last active May 21, 2026 01:12 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 10K Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

Currently, Working on AKBP: Agent Knowledge Base Protocol based on my findings, a protocol for creating, updating, retrieving, and sharing durable knowledge across AI agents.

What the original gets right

@biranchi2018
biranchi2018 / learn_gpt2.py
Last active May 21, 2026 01:09
GPT2 Model
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("distilgpt2")
model = AutoModelForCausalLM.from_pretrained("distilgpt2", output_hidden_states=True)
print(model)
print(model.lm_head)
print(model.transformer.wte) # Dimensions are: (Number of tokens in vocabulary, dimension of model)
print(model.transformer.wte(torch.tensor(464)))
@bobby-tablez
bobby-tablez / theme.ps1
Last active May 21, 2026 01:07
Enable Dark or Light mode in Windows via PowerShell
# Modify Windows 10/11 or Server theme (Light or Dark mode). Makes registry changes which
# take effect upon reboot, or explorer.exe restart. Bypasses restriction to change theme on
# unactivated Windows installations.
#
# Usage:
# To switch to dark mode, run: .\theme.ps1 -Mode dark
# To switch to light mode, run: .\theme.ps1 -Mode light
#
# Optional: Restart the explorer.exe process:
# "Stop-Process -Name explorer -Force; Start-Sleep -Seconds 2; Start-Process explorer"